package Multithreading.base;

public class MainThreadDemo {
    public static void main(String[] args) {
        //创建线程
        Thread thread1 = new Thread();
        Thread thread2 = new Thread();
        //开始线程
        thread1.start();
        thread2.start();

        //返回main线程
        Thread mainThread = Thread.currentThread();

        for(int i = 0; i < 50; i++){
            System.out.println(mainThread.getName() + "\ti=" + i);
        }
    }
}
